<!--
  车道表添加页面
  User: zsj
  Date: 2020-04-08
-->
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >

<!-- BEGIN FORM-->
<div class="portlet light">
    <div class="portlet-title">
        <div class="caption">
            <span class="caption-subject font-red-sunglo bold uppercase">车道表添加</span>
            <span class="caption-helper">添加一条车道表数据</span>
        </div>
    </div>
    <div class="portlet-body form">
        <!-- BEGIN FORM-->
        <form action="#" class="form-horizontal" id="save-module">
            <div class="form-body">

                    <!--  字段信息-->
                    <!-- 停车场id 字段信息-->
                        <div class="form-group">
                            <label class="col-md-3 control-label">停车场id</label>
                            <div class="col-md-7">
                                <div class="input-inline ">
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="fa fa-edit"></i>
                                        </span>
                                        <input type="text" class="form-control" required name="parkId" placeholder="停车场id">
                                    </div>
                                </div>
                            </div>
                        </div>
                    <!-- 停车场名称 字段信息-->
                        <div class="form-group">
                            <label class="col-md-3 control-label">停车场名称</label>
                            <div class="col-md-7">
                                <div class="input-inline ">
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="fa fa-edit"></i>
                                        </span>
                                        <input type="text" class="form-control" required name="parkName" placeholder="停车场名称">
                                    </div>
                                </div>
                            </div>
                        </div>
                    <!-- 车道名称 字段信息-->
                        <div class="form-group">
                            <label class="col-md-3 control-label">车道名称</label>
                            <div class="col-md-7">
                                <div class="input-inline ">
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="fa fa-edit"></i>
                                        </span>
                                        <input type="text" class="form-control" required name="roadName" placeholder="车道名称">
                                    </div>
                                </div>
                            </div>
                        </div>
                    <!-- 车道编号 字段信息-->
                        <div class="form-group">
                            <label class="col-md-3 control-label">车道编号</label>
                            <div class="col-md-7">
                                <div class="input-inline ">
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="fa fa-edit"></i>
                                        </span>
                                        <input type="text" class="form-control" required name="roadCode" placeholder="车道编号">
                                    </div>
                                </div>
                            </div>
                        </div>
                    <!-- 岗亭编号 字段信息-->
                        <div class="form-group">
                            <label class="col-md-3 control-label">岗亭编号</label>
                            <div class="col-md-7">
                                <div class="input-inline ">
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="fa fa-edit"></i>
                                        </span>
                                        <input type="text" class="form-control" required name="sentryBoxCode" placeholder="岗亭编号">
                                    </div>
                                </div>
                            </div>
                        </div>
                    <!-- 进出类型（0-进车，1-出车） 字段信息-->
                        <div class="form-group">
                            <label class="col-md-3 control-label">进出类型（0-进车，1-出车）</label>
                            <div class="col-md-7">
                                <div class="input-inline ">
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="fa fa-edit"></i>
                                        </span>
                                        <input type="number" class="form-control" required digits="true" name="directionType" placeholder="进出类型（0-进车，1-出车）">
                                    </div>
                                </div>
                            </div>
                        </div>
                    <!-- 终端IP 字段信息-->
                        <div class="form-group">
                            <label class="col-md-3 control-label">终端IP</label>
                            <div class="col-md-7">
                                <div class="input-inline ">
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="fa fa-edit"></i>
                                        </span>
                                        <input type="text" class="form-control" required name="terminalIp" placeholder="终端IP">
                                    </div>
                                </div>
                            </div>
                        </div>
                    <!-- 终端名称 字段信息-->
                        <div class="form-group">
                            <label class="col-md-3 control-label">终端名称</label>
                            <div class="col-md-7">
                                <div class="input-inline ">
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="fa fa-edit"></i>
                                        </span>
                                        <input type="text" class="form-control" required name="terminalName" placeholder="终端名称">
                                    </div>
                                </div>
                            </div>
                        </div>
                    <!-- 摄像头IP 字段信息-->
                        <div class="form-group">
                            <label class="col-md-3 control-label">摄像头IP</label>
                            <div class="col-md-7">
                                <div class="input-inline ">
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="fa fa-edit"></i>
                                        </span>
                                        <input type="text" class="form-control" required name="cameraIp" placeholder="摄像头IP">
                                    </div>
                                </div>
                            </div>
                        </div>
                    <!-- 摄像头唯一编号 字段信息-->
                        <div class="form-group">
                            <label class="col-md-3 control-label">摄像头唯一编号</label>
                            <div class="col-md-7">
                                <div class="input-inline ">
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="fa fa-edit"></i>
                                        </span>
                                        <input type="text" class="form-control" required name="cameraNumber" placeholder="摄像头唯一编号">
                                    </div>
                                </div>
                            </div>
                        </div>
                    <!-- 摄像头端口号 字段信息-->
                        <div class="form-group">
                            <label class="col-md-3 control-label">摄像头端口号</label>
                            <div class="col-md-7">
                                <div class="input-inline ">
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="fa fa-edit"></i>
                                        </span>
                                        <input type="number" class="form-control" required digits="true" name="cameraPort" placeholder="摄像头端口号">
                                    </div>
                                </div>
                            </div>
                        </div>
                    <!-- 摄像头登录账号 字段信息-->
                        <div class="form-group">
                            <label class="col-md-3 control-label">摄像头登录账号</label>
                            <div class="col-md-7">
                                <div class="input-inline ">
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="fa fa-edit"></i>
                                        </span>
                                        <input type="text" class="form-control" required name="cameraAccount" placeholder="摄像头登录账号">
                                    </div>
                                </div>
                            </div>
                        </div>
                    <!-- 摄像头登录密码 字段信息-->
                        <div class="form-group">
                            <label class="col-md-3 control-label">摄像头登录密码</label>
                            <div class="col-md-7">
                                <div class="input-inline ">
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="fa fa-edit"></i>
                                        </span>
                                        <input type="text" class="form-control" required name="cameraPassword" placeholder="摄像头登录密码">
                                    </div>
                                </div>
                            </div>
                        </div>
                    <!-- 是否启用摄像头（0-禁止 1-启用） 字段信息-->
                        <div class="form-group">
                            <label class="col-md-3 control-label">是否启用摄像头（0-禁止 1-启用）</label>
                            <div class="col-md-7">
                                <div class="input-inline ">
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="fa fa-edit"></i>
                                        </span>
                                        <input type="number" class="form-control" required digits="true" name="cameraOpenStatus" placeholder="是否启用摄像头（0-禁止 1-启用）">
                                    </div>
                                </div>
                            </div>
                        </div>
                    <!-- 临时车是否允许入场（0-禁止 1-允许 ） 字段信息-->
                        <div class="form-group">
                            <label class="col-md-3 control-label">临时车是否允许入场（0-禁止 1-允许 ）</label>
                            <div class="col-md-7">
                                <div class="input-inline ">
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="fa fa-edit"></i>
                                        </span>
                                        <input type="number" class="form-control" required digits="true" name="openStatus" placeholder="临时车是否允许入场（0-禁止 1-允许 ）">
                                    </div>
                                </div>
                            </div>
                        </div>
                    <!-- 创建时间 字段信息-->
                        <div class="form-group">
                            <label class="col-md-3 control-label">创建时间</label>
                            <div class="col-md-7">
                                <div class="input-inline ">
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="fa fa-edit"></i>
                                        </span>
                                        <input type="text" class="form-control bs-date" required name="createTime" placeholder="创建时间">
                                    </div>
                                </div>
                            </div>
                        </div>
                    <!-- 区域ID 字段信息-->
                        <div class="form-group">
                            <label class="col-md-3 control-label">区域ID</label>
                            <div class="col-md-7">
                                <div class="input-inline ">
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="fa fa-edit"></i>
                                        </span>
                                        <input type="text" class="form-control" required name="customOne" placeholder="区域ID">
                                    </div>
                                </div>
                            </div>
                        </div>
                    <!-- 区域名称 字段信息-->
                        <div class="form-group">
                            <label class="col-md-3 control-label">区域名称</label>
                            <div class="col-md-7">
                                <div class="input-inline ">
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="fa fa-edit"></i>
                                        </span>
                                        <input type="text" class="form-control" required name="customTwo" placeholder="区域名称">
                                    </div>
                                </div>
                            </div>
                        </div>
                    <!-- 品牌 字段信息-->
                        <div class="form-group">
                            <label class="col-md-3 control-label">品牌</label>
                            <div class="col-md-7">
                                <div class="input-inline ">
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="fa fa-edit"></i>
                                        </span>
                                        <input type="text" class="form-control" required name="customThree" placeholder="品牌">
                                    </div>
                                </div>
                            </div>
                        </div>
                    <!-- 型号（包含版本号） 字段信息-->
                        <div class="form-group">
                            <label class="col-md-3 control-label">型号（包含版本号）</label>
                            <div class="col-md-7">
                                <div class="input-inline ">
                                    <div class="input-group">
                                        <span class="input-group-addon">
                                            <i class="fa fa-edit"></i>
                                        </span>
                                        <input type="text" class="form-control" required name="customFour" placeholder="型号（包含版本号）">
                                    </div>
                                </div>
                            </div>
                        </div>

            </div>
            <div class="form-actions">
                <div class="row">
                    <div class="col-md-12">
                        <div class="row">
                            <div class="col-md-offset-3 col-md-7">
                                <button type="button" class="btn green" onclick="save();">保存</button>
                                <button type="button" class="btn default" onclick="layer.close(layer_addModule);">取消</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </form>
        <!-- END FORM-->
    </div>
</div>

<script>

    $(function(){
        //初始化页面
        initPage();
    });

    function save(){
        let param = tools.formParams("save-module");
        if(tools.valid("save-module")){
            tools.post("/road/save",param,function(data){
                if(data.success){
                    layer.msg('保存成功', {icon: 1,time:1000},function(){
                        //刷新列表页面
                        toPage(null);
                        //关闭弹窗
                        layer.close(layer_addModule);
                    });
                }else{
                    tools.errorTip(data);
                }
            });
        }
    }

</script>
</html>